<?php
    require_once("./src/RestClient.php");
    $url = "";
    $restclient = null;
    
    if (isset($_POST["generar"])){
        
        $user_agent = "PHP Sample Rest Client"; 
        $url = "http://localhost:8080/horariorest/app/services";
        $restclient = new RestClient(null, null, null, $user_agent, null);
        $restclient->getWebRequest($url); 
    }
    
?>
 <html>
 <head>
    <title></title>
 </head>
 <body>
    <span><b>Servicio invocado </b><?php echo $url; ?> </span><br />
    <br />
    
    
    <span><b>Respuesta del servidor en java</b></span>
    <div id="response">
        
            <?php
                if (!is_null($restclient))
                {
                  echo $restclient->getWebResponse();
                }
            ?>
        
    </div>
    <br />
    <form action="#" method="POST">
        <input type="submit" value="Generar" name="generar" onclick="restcall()" />
    </form>
    
    
 </body>
 </html>